package com.lx.algorithm.ac;

import com.lx.algorithm.Tree.Node;

/**
 * Description:
 * Copyright:   Copyright (c)2019
 * Company:     zefu
 *
 * @author: 张李鑫
 * @version: 1.0
 * Create at:   2021-12-27 17:39:47
 * <p>
 * Modification History:
 * Date         Author      Version     Description
 * ------------------------------------------------------------------
 * 2021-12-27     张李鑫                     1.0         1.0 Version
 */
public class Ac {
    /**
     * ac自动机 Automation
     */
    public static class Node {
        //代表要走的路
        private Node[] ways;
        //代表结束的字符
        private String endStr;
        //代表是否被选择
        private Boolean isSelect;
        //fail 节点
        private Node fail;

        public Node(Node[] ways, String endStr, Boolean isSelect, Node fail) {
            this.ways = ways;
            this.endStr = endStr;
            this.isSelect = isSelect;
            this.fail = fail;
        }

        public Node() {
        }
    }
}
